package com.atguigu.facade;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 子系统5：灯光
 * @create: 2022-02-21 14:35
 **/
public class TheaterLight {
    /**
     * 单例模式，使用饿汉式
     */
    private static TheaterLight instance = new TheaterLight();

    public static TheaterLight getInstance(){
        return instance;
    }

    public void on(){
        System.out.println("灯光 打开");
    }

    public void off(){
        System.out.println("灯光 关闭");
    }

    public void dim(){
        System.out.println("灯光 调暗一点");
    }

    public void bright(){
        System.out.println("灯光 调亮一点");
    }
}
